<template>
  <div class="out-icon">
  
        <el-tooltip content="退出登录" >
           <i class="el-icon-s-promotion" @click="logout"></i>
        </el-tooltip> 
        
  </div>
</template>

<script>
// fuse is a lightweight fuzzy-search module
// make search results more in line with expectations
import Fuse from 'fuse.js/dist/fuse.min.js'
import path from 'path'
import { isHttp } from '@/utils/validate'

export default {
  name: 'HeaderSearch',
  data() {
    return { 
    }
  },
  computed: {
    routes() {
      return this.$store.getters.defaultRoutes
    }
  },
  watch: {
    routes() {
      this.searchPool = this.generateRoutes(this.routes)
    },
     
   
  },
  mounted() { 
  },
  methods: {
     logout() {
      this.$confirm('确定注销并退出系统吗？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$store.dispatch('LogOut').then(() => {
          location.href = '/index'
        })
      }).catch(() => {})
    } ,  
  }
}
</script>

<style lang="scss" scoped>
 
 .out-icon {
    cursor: pointer;
    font-size:  30px !important;
    vertical-align: middle;
  }
 
  
</style>
